
package cn.majingjing.tm;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

	@Autowired
	private UserApi userApi;
	@Autowired
	private SystemApi systemApi;

	@RequestMapping("/dubbo/t1")
	public Object t1(Integer id) {
		String name = userApi.userInfo(id);
		System.out.println(name);
		return name;
	}
	
	@RequestMapping("/dubbo/t2")
	public Object t2(Integer id) {
		String name = systemApi.uuid(id);
		System.out.println(name);
		return name;
	}

	@RequestMapping("/hello")
	public Object hello(Model model) {
		return "Hello Spring MVC";
	}

}